<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>项目经理管理</title>
	<link rel="stylesheet" href="css/common.css">
	<link rel="stylesheet" href="css/artisan.css">
	<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
	<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
	<div class="top"></div>
	<script type="text/javascript">$('.top').load('common/header.html')</script>
	<div class="main">
		<div class="search">
			<form action="" method="get" id="search">
				<input type="text" name="keywords" class="txt" />
				<input type="hidden" name="level" />
				<input type="submit" value="搜索" class="btn" />
			</form>
			<a class="addBtn btn addManager">添加项目经理</a>
		</div>

		<table class="list" cellpadding="0" cellspacing="0">
			<tr>
				<th>项目经理编号</th>
				<th>项目经理姓名</th>
				<th>手机号</th>
				<th class="level">
					<span class="selectedLevel">等级</span>
					<i class="ico"></i>
					<ul>
						<li onclick="selectLevel(1)">高级</li>
						<li onclick="selectLevel(2)">中级</li>
						<li onclick="selectLevel(3)">普通</li>
					</ul>
				</th>
				<th>计划项目</th>
				<th>在施工项目</th>
				<th>已完成项目</th>
				<th>已结算项目</th>
				<th>已支付项目</th>
				<th>支付</th>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td><a href="#">支付</a></td>
			</tr>
		</table>
	</div>
</body>
<script type="text/javascript">
	$(function() {
		var level = urlGet('level');
		var keywords = urlGet('keywords');
		$('#search input[name="level"]').val(level);
		$('#search input[name="keywords"]').val(keywords);
		switch(level){
			case '1':
			$('.selectedLevel').text('高级');
			$('.level').addClass('on');
			break;
			case '2':
			$('.selectedLevel').text('中级');
			$('.level').addClass('on');
			break;
			case '3':
			$('.selectedLevel').text('普通');
			$('.level').addClass('on');
			break;
			default:
			$('.selectedLevel').text('等级');
			if($('.level').hasClass('on')) {
				$(this).removeClass('on');
			}
			break;
		}

		$('.level .ico').click(function() {
			$('#search input[name="level"]').val('');
			$('#search').submit();
		});
	});


	function selectLevel(num) {
		$('#search input[name="level"]').val(num);
		$('#search').submit();
	}
</script>
</html>